package com.hfb.mashibing.alip8.jvm.c2_classloader;

import sun.awt.HKSCS;
import sun.net.spi.nameservice.dns.DNSNameService;

/**
 * Class Loader
 */
public class T002_ClassLoaderLevel {

    public static void main(String[] args) {

        System.out.println("Bootstrap Classloader");
        final String format = "%s classLoader is %s\n";
        System.out.printf(format,"String",String.class.getClassLoader());
        System.out.printf(format,"sun.awt.HKSCS",HKSCS.class.getClassLoader());
        System.out.printf(format,"sun.net.spi.nameservice.dns.DNSNameService.class.getClassLoader().class.getClassLoader()",DNSNameService.class.getClassLoader().getClass().getClassLoader());

        System.out.println("ExtClassLoader");
        System.out.printf(format,"sun.net.spi.nameservice.dns.DNSNameService",DNSNameService.class.getClassLoader());

        System.out.println("AppClassLoader");
        System.out.printf(format, T002_ClassLoaderLevel.class.getName(), T002_ClassLoaderLevel.class.getClassLoader());


        System.out.println();
    }
}
